package chapter8;

/**
 * @Author juzipi
 * @Date 2021/5/20 10:08
 * @Info
 */
public class HeapSpaceInitial {

    public static void main(String[] args) {

        long initialMemory = Runtime.getRuntime().totalMemory() / 1024 / 1024;

        long maxMemory = Runtime.getRuntime().maxMemory() / 1024 / 1024;

        System.out.println("-Xms"+initialMemory+"m");
        System.out.println("-Xmx"+maxMemory+"m");

//        System.out.println("系统内存大小"+initialMemory * 64.0 / 1024);
//        System.out.println("系统内存大小"+maxMemory * 4.0 / 1024);

//            try {
//                Thread.sleep(1000000);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }

    }




}
